package model;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the SUPPLIES database table.
 * 
 */
@Entity
@Table(name="SUPPLIES")
public class Supply implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private SupplyPK id;

	@Column(name="SUPPLIES_UNIT_PRICE")
	private BigDecimal suppliesUnitPrice;

	//bi-directional many-to-one association to RawMaterial
	@ManyToOne
	@JoinColumn(name="MATERIAL_ID")
	private RawMaterial rawMaterial;

	//bi-directional many-to-one association to Vendor
	@ManyToOne
	@JoinColumn(name="VENDOR_ID")
	private Vendor vendor;

	public Supply() {
	}

	public SupplyPK getId() {
		return this.id;
	}

	public void setId(SupplyPK id) {
		this.id = id;
	}

	public BigDecimal getSuppliesUnitPrice() {
		return this.suppliesUnitPrice;
	}

	public void setSuppliesUnitPrice(BigDecimal suppliesUnitPrice) {
		this.suppliesUnitPrice = suppliesUnitPrice;
	}

	public RawMaterial getRawMaterial() {
		return this.rawMaterial;
	}

	public void setRawMaterial(RawMaterial rawMaterial) {
		this.rawMaterial = rawMaterial;
	}

	
	public Vendor getVendor() {
		return this.vendor;
	}

	public void setVendor(Vendor vendor) {
		this.vendor = vendor;
	}

	
}